﻿<form action="index.php" method="post" name="addForm" >
<table>
	<tr>
		<td>Tên	</td>
		<td>
			<input type="text" style="width:260px;" name="name" value="<?php echo @$this->user->name ?>" />		
		</td>
	</tr>
	<tr>
		<td>Tên đăng nhập</td>
		<td>
			<input type="text" style="width:260px;" name="username" value="<?php echo @$this->user->username ?>" />		
		</td>
	</tr>
	<tr>
		<td>
			Mật khẩu
		</td>
		<td>
		<input type="password" style="width:260px;" name="password"  value="" />			
		</td>
	</tr>
	<tr>
		<td>
			Nhập lại mật khẩu
		</td>
		<td>
		<input type="password" style="width:260px;" name="repassword"  value="" />			
		</td>
	</tr>
	<tr>
		<td>
			Email
		</td>
		<td>
		<input type="text" style="width:260px;" name="email"  value="<?php echo @$this->user->email ?>" />			
		</td>
	</tr>
	<tr>
		<td>
			Chặn người dùng
		</td>
		<td >Có <input type="radio" <?php echo (@$this->user->block==1)?'checked':''; ?> name="block" <?php echo (!isset($this->user->block))?'checked':''; ?> value="1" /> Không <input name="block" type="radio"  <?php echo (@$this->user->block==0)?'checked':''; ?> value="0" /></td>
	</tr>
	<tr>
		<td>
			Quyền
		</td>
		<td >Admin<input type="radio" <?php echo (@$this->user->per==1)?'checked':''; ?> name="per" <?php echo (!isset($this->user->per))?'checked':''; ?> value="1" /> Mod <input name="per" type="radio"  <?php echo (@$this->user->per==0)?'checked':''; ?> value="0" /></td>			
	</tr>
	
	<tr>
		<td>
			<input type="submit"  value="Save" />
			<input type="button" onclick="document.location.href='index.php?c=user';" value="Close" />
		</td>
	</tr>
</table>
<input type="hidden" name="c" value="user" />
<input type="hidden" name="t" value="proccessadd" />
<input type="hidden" name="tusername" value="<?php echo @$this->user->username ?>" />
<input type="hidden" name="tpassword" value="<?php echo @$this->user->password ?>" />
<input type="hidden" name="temail" value="<?php echo @$this->user->email ?>" />
<input type="hidden" name="id" value="<?php echo @(int)$this->user->id ?>" />
</form>
<script >
	function checkvalid()
	{
		if(document.addFrom.name.value=='')
			alert('Vui lòng nhập tên category!');
		else
			document.addFrom.submit();
	}
</script>